#!/bin/bash
set -e
rm -rf  src/main/docker/mqtt-iot-0.0.1-SNAPSHOT.jar
mvn clean package
scp src/main/docker/mqtt-iot-0.0.1-SNAPSHOT.jar  root@47.92.171.216:/root/mqtt-iot/
rm -rf  src/main/docker/mqtt-iot-0.0.1-SNAPSHOT.jar
ssh root@47.92.171.216  << eeooff

cd /root/mqtt-iot/
sh shutdown.sh
sh startup.sh

echo "========= deploy success ========="

exit
eeooff
